<?php
$role_access = Zend_Registry::get('role_access'); 
if ($this->user->role =="ADMIN") {
    $userTypeAdmin = TRUE;
} else {
    $userTypeAdmin = FALSE;
}
?>
<div id="MainContent">
    <div class="clearb">&nbsp;</div>
    <div class="navt_menu">
        <div style="clear: both;"></div>
    </div>
    <div class="sections">
        <div class="MainMenu">
            
            <?php if (array_key_exists('customer', $role_access) || ($userTypeAdmin)): ?>
            <div class="itemmenucontainer-menubar">
                <div class="itemoverflow">
                    <a class="title-itemlink" href="<?php echo $this->url(array('controller' => 'customer', 'action' => 'list',), null, true); ?>">Customers</a><br />
                    <p class="itemicon">
                        <a href="<?php echo $this->url(array('controller' => 'customer', 'action' => 'list',), null, true); ?>">
                            <img src="<?php echo $this->IMAGE_PATH; ?>icons/topfiles/users.gif"  height="60px" width="60px" class="itemicon" alt="Customer" title="Customer" />
                        </a>
                    </p>

                    <p class="itemtext"><a class="itemlink" href="<?php echo $this->url(array('controller' => 'customer', 'action' => 'list',), null, true); ?>">Customer</a><br />
                        This is where we list customers.<br />
                        Subitems: <a class="itemsublink" href="<?php echo $this->url(array('controller' => 'customer', 'action' => 'form',), null, true); ?>">Add Customer</a>, 
                        <a class="itemsublink" href="<?php echo $this->url(array('controller' => 'customer', 'action' => 'list',), null, true); ?>">Customer Listing</a>, 
                        <a class="itemsublink" href="<?php echo $this->url(array('controller' => 'customer', 'action' => 'project',), null, true); ?>">Customer's Project</a>
                    </p>
                </div>
            </div>
            <?php endif;?>

            <?php if (array_key_exists('contractor', $role_access) || ($userTypeAdmin)): ?>
            <div class="itemmenucontainer-menubar">
                <div class="itemoverflow">
                    <a class="title-itemlink" href="<?php echo $this->url(array('controller' => 'contractor', 'action' => 'list',), null, true); ?>">Contractors</a><br />
                    <p class="itemicon">
                        <a href="<?php echo $this->url(array('controller' => 'contractor', 'action' => 'list',), null, true); ?>">
                            <img src="<?php echo $this->IMAGE_PATH; ?>icons/topfiles/contractor.gif"  height="60px" width="60px" class="itemicon" alt="contractor" title="contractor" />
                        </a>
                    </p>

                    <p class="itemtext"><a class="itemlink" href="<?php echo $this->url(array('controller' => 'contractor', 'action' => 'list',), null, true); ?>">Contractor</a><br />
                        This is where we list contractors.<br />
                        Subitems: <a class="itemsublink" href="<?php echo $this->url(array('controller' => 'contractor', 'action' => 'form',), null, true); ?>">Add Contractor</a>, 
                        <a class="itemsublink" href="<?php echo $this->url(array('controller' => 'contractor', 'action' => 'list',), null, true); ?>">Contractor Listing</a>,
                        <a class="itemsublink" href="<?php echo $this->url(array('controller' => 'contractor', 'action' => 'project',), null, true); ?>">Contractor's Project</a>
                    </p>
                </div>
            </div>
            <?php endif;?>

            <?php if (array_key_exists('designer', $role_access) || ($userTypeAdmin)): ?>
            <div class="itemmenucontainer-menubar">
                <div class="itemoverflow">
                    <a class="title-itemlink" href="<?php echo $this->url(array('controller' => 'designer', 'action' => 'list',), null, true); ?>">Designer</a><br />
                    <p class="itemicon">
                        <a href="<?php echo $this->url(array('controller' => 'designer', 'action' => 'list',), null, true); ?>">
                            <img src="<?php echo $this->IMAGE_PATH; ?>icons/topfiles/designer.png"  height="60px" width="60px" class="itemicon" alt="Designer" title="Designer" />
                        </a>
                    </p>

                    <p class="itemtext"><a class="itemlink" href="<?php echo $this->url(array('controller' => 'designer', 'action' => 'list',), null, true); ?>">Designer</a><br />
                        This is where we list designer.<br />
                        Subitems: <a class="itemsublink" href="<?php echo $this->url(array('controller' => 'designer', 'action' => 'form',), null, true); ?>">Add Designer</a>, 
                        <a class="itemsublink" href="<?php echo $this->url(array('controller' => 'designer', 'action' => 'list',), null, true); ?>">Designer Listing</a>
                    </p>
                </div>
            </div>
            <?php endif;?>
            
            <?php if (array_key_exists('product', $role_access) || ($userTypeAdmin)): ?>
            <div class="itemmenucontainer-menubar">
                <div class="itemoverflow">
                    <a class="title-itemlink" href="<?php echo $this->url(array('controller' => 'product', 'action' => 'list',), null, true); ?>">Product</a><br />
                    <p class="itemicon">
                        <a href="<?php echo $this->url(array('controller' => 'product', 'action' => 'list',), null, true); ?>">
                            <img src="<?php echo $this->IMAGE_PATH; ?>icons/topfiles/product.png"  height="60px" width="60px" class="itemicon" alt="Product" title="Product" />
                        </a>
                    </p>

                    <p class="itemtext"><a class="itemlink" href="<?php echo $this->url(array('controller' => 'product', 'action' => 'list',), null, true); ?>">Product</a><br />
                        This is where we list product.<br />
                        Subitems: <a class="itemsublink" href="<?php echo $this->url(array('controller' => 'product', 'action' => 'form',), null, true); ?>">Add Product</a>, 
                        <a class="itemsublink" href="<?php echo $this->url(array('controller' => 'product', 'action' => 'list',), null, true); ?>">Product Listing</a>
                    </p>
                </div>
            </div>
            <?php endif;?>

            <?php if (array_key_exists('job', $role_access) || ($userTypeAdmin)): ?>
            <div class="itemmenucontainer-menubar">
                <div class="itemoverflow">
                    <a class="title-itemlink" href="<?php echo $this->url(array('controller' => 'job', 'action' => 'list',), null, true); ?>">Job</a><br />
                    <p class="itemicon">
                        <a href="<?php echo $this->url(array('controller' => 'job', 'action' => 'list',), null, true); ?>">
                            <img src="<?php echo $this->IMAGE_PATH; ?>icons/topfiles/job.png"  height="60px" width="60px" class="itemicon" alt="Job" title="Job" />
                        </a>
                    </p>

                    <p class="itemtext"><a class="itemlink" href="<?php echo $this->url(array('controller' => 'job', 'action' => 'list',), null, true); ?>">Job</a><br />
                        This is where we list job.<br />
                        Subitems: <a class="itemsublink" href="<?php echo $this->url(array('controller' => 'job', 'action' => 'form',), null, true); ?>">Add Job</a>, 
                        <a class="itemsublink" href="<?php echo $this->url(array('controller' => 'job', 'action' => 'list',), null, true); ?>">Job Listing</a>
                    </p>
                </div>
            </div>
            <?php endif;?>
            
            <?php if (array_key_exists('calculator', $role_access) || ($userTypeAdmin)): ?>
            <div class="itemmenucontainer-menubar">
                <div class="itemoverflow">
                    <a class="title-itemlink" href="<?php echo $this->url(array('controller' => 'calculator', 'action' => 'index'), null, TRUE); ?>">Renovation Cost Calculator</a><br />
                    <p class="itemicon">
                        <a href="<?php echo $this->url(array('controller' => 'calculator', 'action' => 'index'), null, TRUE); ?>">
                            <img src="<?php echo $this->IMAGE_PATH; ?>icons/topfiles/calculator.png" height="60px" width="60px" class="itemicon" alt="renovation cost calculator" title="renovation cost calculator" />
                        </a>
                    </p>
                    <p class="itemtext">
                        <a class="itemlink" href="<?php echo $this->url(array('controller' => 'calculator', 'action' => 'index'), null, TRUE); ?>">Renovation Cost Calculator </a><br />
                        This is where you can calculate the renovation cost by adding job and item quickly.<br />
                        Subitems: <a class="itemsublink" href="<?php echo $this->url(array('controller' => 'calculator', 'action' => 'index'), null, TRUE); ?>">Renovation Cost Calculator </a>
                    </p>
                </div>
            </div>
            <?php endif;?>
            

            <?php if (array_key_exists('quotation', $role_access) || ($userTypeAdmin)): ?>
            <div class="itemmenucontainer-menubar">
                <div class="itemoverflow">
                    <a class="title-itemlink" href="<?php echo $this->url(array('controller' => 'quotation', 'action' => 'list',), null, true); ?>">Quotation</a><br />
                    <p class="itemicon">
                        <a href="<?php echo $this->url(array('controller' => 'quotation', 'action' => 'list',), null, true); ?>">
                            <img src="<?php echo $this->IMAGE_PATH; ?>icons/topfiles/quotation.gif"  height="60px" width="60px" class="itemicon" alt="Quotation" title="Quotation" />
                        </a>
                    </p>
                    <p class="itemtext"><a class="itemlink" href="<?php echo $this->url(array('controller' => 'quotation', 'action' => 'list',), null, true); ?>">Quotation</a><br />
                        This is where we list quotation.<br />
                        Subitems: <a class="itemsublink" href="<?php echo $this->url(array('controller' => 'quotation', 'action' => 'form',), null, true); ?>">Add Quotation</a>, 
                        <a class="itemsublink" href="<?php echo $this->url(array('controller' => 'quotation', 'action' => 'list',), null, true); ?>">Quotation Listing</a>
                    </p>
                </div>
            </div>
            <?php endif;?>
            
            <?php if (array_key_exists('project', $role_access) || ($userTypeAdmin)): ?>
            <div class="itemmenucontainer-menubar">
                <div class="itemoverflow">
                    <a class="title-itemlink" href="<?php echo $this->url(array('controller' => 'project', 'action' => 'index'), null, TRUE); ?>">Project</a><br />
                    <p class="itemicon">
                        <a href="<?php echo $this->url(array('controller' => 'project', 'action' => 'index'), null, TRUE); ?>">
                            <img src="<?php echo $this->IMAGE_PATH; ?>icons/topfiles/project.png" height="60px" width="60px" class="itemicon" alt="project" title="project" />
                        </a>
                    </p>
                    <p class="itemtext">
                        <a class="itemlink" href="<?php echo $this->url(array('controller' => 'project', 'action' => 'index'), null, TRUE); ?>">Project </a>
                        This is where we list project.<br />
                        Subitems: <a class="itemsublink" href="<?php echo $this->url(array('controller' => 'project', 'action' => 'form',), null, true); ?>">Add Project</a>, 
                        <a class="itemsublink" href="<?php echo $this->url(array('controller' => 'project', 'action' => 'list',), null, true); ?>">Project Listing</a>
                    </p>
                </div>
            </div>
            <?php endif;?>
            
            
            <?php if (array_key_exists('category', $role_access) || ($userTypeAdmin)): ?>
            <div class="itemmenucontainer-menubar">
                <div class="itemoverflow">
                    <a class="title-itemlink" href="<?php echo $this->url(array('controller' => 'category', 'action' => 'index'), null, TRUE); ?>">Category</a><br />
                    <p class="itemicon">
                        <a href="<?php echo $this->url(array('controller' => 'category', 'action' => 'index'), null, TRUE); ?>">
                            <img src="<?php echo $this->IMAGE_PATH; ?>icons/topfiles/categories.png" height="60px" width="60px" class="itemicon" alt="category" title="category" />
                        </a>
                    </p>
                    <p class="itemtext">
                        <a class="itemlink" href="<?php echo $this->url(array('controller' => 'category', 'action' => 'index'), null, TRUE); ?>">Category</a>
                        This is where we list category.<br />
                        Subitems: <a class="itemsublink" href="<?php echo $this->url(array('controller' => 'category', 'action' => 'form',), null, true); ?>">Add Category</a>, 
                        <a class="itemsublink" href="<?php echo $this->url(array('controller' => 'category', 'action' => 'list',), null, true); ?>">Category Listing</a>
                    </p>
                </div>
            </div>
            <?php endif;?>
            
            
            <?php if ($this->user->role =="ADMIN"): ?>
            <div class="itemmenucontainer-menubar">
                <div class="itemoverflow">
                    <a class="title-itemlink" href="<?php echo $this->url(array('controller' => 'role', 'action' => 'index'), null, TRUE); ?>">Role Management</a><br />
                    <p class="itemicon">
                        <a href="<?php echo $this->url(array('controller' => 'role', 'action' => 'index'), null, TRUE); ?>">
                            <img src="<?php echo $this->IMAGE_PATH; ?>icons/topfiles/access.png" height="60px" width="60px" class="itemicon" alt="access" title="access" />
                        </a>
                    </p>
                    <p class="itemtext">
                        <a class="itemlink" href="<?php echo $this->url(array('controller' => 'role', 'action' => 'index'), null, TRUE); ?>">Role Management</a><br />
                        This is where you can give access of modules to different role like customer, contactor, designer.<br />
                    </p>
                </div>
            </div>
            <?php endif; ?>

            
            
            <?php if ($this->user->role =="ADMIN"): ?>
            <div class="itemmenucontainer-menubar">
                <div class="itemoverflow">
                    <a class="title-itemlink" href="<?php echo $this->url(array('controller' => 'preference', 'action' => 'profile'), null, TRUE); ?>">Site Preferences</a><br />
                    <p class="itemicon">
                        <a href="<?php echo $this->url(array('controller' => 'preference', 'action' => 'profile'), null, TRUE); ?>">
                            <img src="<?php echo $this->IMAGE_PATH; ?>icons/topfiles/siteadmin.gif" height="60px" width="60px" class="itemicon" alt="mypreferences" title="mypreferences" />
                        </a>
                    </p>
                    <p class="itemtext">
                        <a class="itemlink" href="<?php echo $this->url(array('controller' => 'preference', 'action' => 'profile'), null, TRUE); ?>">Site Preferences</a><br />
                        This is where you can customize site admin settings and preference and add unit of measurements.<br />
                        Subitems: <a class="itemsublink" href="<?php echo $this->url(array('controller' => 'preference', 'action' => 'profile'), null, TRUE); ?>">Edit profile</a>, 
                        <a class="itemsublink" href="<?php echo $this->url(array('controller' => 'preference', 'action' => 'uom',), null, true); ?>">UOM management</a>
                    </p>
                </div>
            </div>
            <?php else: ?>
            
            <div class="itemmenucontainer-menubar">
                <div class="itemoverflow">
                    <a class="title-itemlink" href="<?php echo $this->url(array('controller' => strtolower($this->user->role), 'action' => 'profile'), null, TRUE); ?>">Site Preferences</a><br />
                    <p class="itemicon">
                        <a href="<?php echo $this->url(array('controller' => strtolower($this->user->role), 'action' => 'profile'), null, TRUE); ?>">
                            <img src="<?php echo $this->IMAGE_PATH; ?>icons/topfiles/siteadmin.gif" height="60px" width="60px" class="itemicon" alt="mypreferences" title="mypreferences" />
                        </a>
                    </p>
                    <p class="itemtext">
                        <a class="itemlink" href="<?php echo $this->url(array('controller' => strtolower($this->user->role), 'action' => 'profile'), null, TRUE); ?>">Site Preferences</a><br />
                        This is where you can edit your profile .<br />
                        Subitems: <a class="itemsublink" href="<?php echo $this->url(array('controller' => strtolower($this->user->role), 'action' => 'profile'), null, TRUE); ?>">Edit profile</a>, 
                    </p>
                </div>
            </div>
            
            <?php endif; ?>
            
        </div>
    </div>
    <div class="clearb"></div>
</div>